package kgc.crm.model;

import com.baomidou.mybatisplus.annotation.*;
import kgc.crm.annotation.IsNull;
import kgc.crm.enums.MenuTypeEnum;
import kgc.crm.enums.UserStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 后台菜单表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "kgc_crm_admin_menu")
public class Menu {
    /**
     * 菜单ID
     */
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Integer menuId;

    /**
     * 上级菜单ID
     */
    @IsNull
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * 菜单名称
     */
    @IsNull
    @TableField(value = "menu_name")
    private String menuName;

    /**
     * 链接地址
     */
    @IsNull
    @TableField(value = "realm")
    private String realm;

    /**
     * 菜单类型  1目录 2 菜单 3 按钮 4特殊
     */
    @TableField(value = "menu_type")
    @IsNull
    private MenuTypeEnum  menuTypeEnum;

    /**
     * 排序（同级有效）
     */
    @IsNull
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 状态 1 启用 0 禁用
     */
    @IsNull
    @TableLogic
    @TableField(value = "status")
    private UserStatusEnum userStatusEnum;

    /**
     * 菜单说明
     */
    @IsNull
    @TableField(value = "remarks")
    private String remarks;

    public static final String COL_MENU_ID = "menu_id";

    public static final String COL_PARENT_ID = "parent_id";

    public static final String COL_MENU_NAME = "menu_name";

    public static final String COL_REALM = "realm";

    public static final String COL_MENU_TYPE = "menu_type";

    public static final String COL_SORT = "sort";

    public static final String COL_STATUS = "status";

    public static final String COL_REMARKS = "remarks";
}